﻿using OccupierArchiver.Properties;

namespace OccupierArchiver.Helpers
{
    internal static class SettingsManager
    {
        internal static void CheckSettings()
        {
            var maxt = Settings.Default.MaxTimeout;
            var maxp = Settings.Default.MaxThreads;

            if (maxp <= 0 || maxp > 16)
            {
                Settings.Default.MaxThreads = 8;
            }

            if (maxt <= 0 || maxt > 3600000)
            {
                Settings.Default.MaxTimeout = 1000;
            }
        }

        internal static void SaveSettings()
        {
            Settings.Default.Save();
        }
    }
}
